﻿Module Module1
  Sub Main()

    Dim auto = New With {.Marca = "Renault",
      .Modello = "Megane", .Cilindrata = 1600}

    auto.Marca = "Fiat"
    auto.Modello = "500"
    auto.Cilindrata = 1400

    Dim auto1 = New With {.Marca = "Renault", _
        .Modello = "Megane", .Cilindrata = 1600, _
        Key .Targa = "AA999AA"}

    Dim auto2 = New With {.Marca = "Renault", _
        .Modello = "Megane", .Cilindrata = 1600, _
        Key .Targa = "AA999AA"}
    Dim auto3 = New With {.Marca = "Renault", _
        .Modello = "Megane", .Cilindrata = 1600, _
        .Targa = "AA999AA"}
    Dim uguale = auto2.Equals(auto3)

    Dim auto4 = New With {Key .Marca = "Renault", _
        .Modello = "Megane", .Cilindrata = 1600, _
        .Targa = "AA999AA"}
    Dim auto5 = New With {Key .Marca = "Renault", _
        .Modello = "Corolla", .Cilindrata = 1800, _
        .Targa = "ZZ111ZZ"}
    Dim uguale2 = auto4.Equals(auto5)

    Dim auto6 = New With {.Marca = "Renault", _
        .Modello = "Megane", .Cilindrata = 1600, _
        Key .Targa = "AA999AA"}
    Dim auto7 = New With {.Marca = "Renault", _
        .Modello = "Corolla", .Cilindrata = 1800, _
        Key .Targa = "ZZ111ZZ"}
    Dim uguale3 = auto6.Equals(auto7)


  End Sub
End Module
